home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
datatypes
/
sun.datatype
/
sun.datatype.install
< prev
next >
Wrap
Text File
|
1996-04-07
|
4KB
|
141 lines
; SUN Datatype Installer Script
; $VER: sun.datatype.install 39.6 (22.1.95)
;
; First make sure we have WB3.0
(set @default-dest "")
(if (< (/ (getversion) 65536) 39)
(
(abort "You must have at least Workbench 3.0")
))
; Now check for at least a 68020 processor
(set proc (database "cpu"))
(set cpu (askchoice
(prompt "Which version do you want to install ?")
(choices "68000" "68020")
(if (OR (= proc "68000") (= proc "68010"))
(default 0)
(default 1)
)
(help
(cat "On machines with an 68020 processor or higher, like "
"the Amiga 1200, 2500, 3000 and 4000 you can select "
"the 68020 version, which is optimized for those "
"processors.\n\n"
"If you have an Amiga with a 68000 or 68010 processor, "
"like the standard version of the Amiga 500, 500+, "
"600, 2000 and you have upgraded to Kickstart 3.0 or "
"higher, then you must select the 68000 version."))
))
; Check that the datatypes directory exists
(if (NOT (exists "SYS:classes/datatypes"))
(
(abort "Can't find the SYS:classes/datatypes directory")
))
; Copy the datatype to it
(copylib
(prompt "")
(help @copyfiles-help)
(if (= cpu 0)
(source "Classes/DataTypes/sun.datatype.68000")
(source "Classes/DataTypes/sun.datatype.68020")
)
(dest "SYS:classes/datatypes")
(newname "sun.datatype")
(confirm)
)
; Find out what sort of installation this is
(set choice (askchoice
(prompt "Install as permanently enabled, or manually selectable")
(choices "Permanently enabled" "Manual select")
(help
(cat "The datatype can be installed as permanently enabled, or"
" manually selectable.\n\n"
"Pemanently enabled means that the datatype is always ready for use.\n\n"
"Manually Selectable means that the datatype has to be\n"
"run before it can be used. Once it has been run, it\n"
"remains installed until the computer is rebooted."))
))
(if (= choice 0)
(
; Permanent installation
; Check that the datatypes directory exists
(if (NOT (exists "DEVS:datatypes"))
(
(abort "Can't find the DEVS:datatypes directory")
))
(if (NOT (exists "DEVS:DataTypes/Sun Raster"))
(
; Copy the datatype to it
(copyfiles
(prompt "")
(help @copyfiles-help)
(source "Sun Raster")
(infos)
(dest "DEVS:datatypes")
)
))
)
(
; Manual installation
; Check that the storage directory exists
(if (NOT (exists "SYS:Storage/datatypes"))
(
(abort "Can't find the SYS:Storage/Datatypes directory")
))
(if (NOT (exists "SYS:Storage/DataTypes/Sun Raster"))
(
; Copy the datatype to it
(copyfiles
(prompt "")
(help @copyfiles-help)
(source "Sun Raster")
(infos)
(dest "SYS:Storage/Datatypes")
)
))
))
; Delete the old versions of the datatype description, if available
(if (exists "DEVS:datatypes/SUN")
(
(delete "DEVS:datatypes/SUN")
))
(if (exists "DEVS:datatypes/SUN.info")
(
(delete "DEVS:datatypes/SUN.info")
))
(if (exists "SYS:Storage/datatypes/SUN")
(
(delete "SYS:Storage/datatypes/SUN")
))
(if (exists "SYS:Storage/datatypes/SUN.info")
(
(delete "SYS:Storage/datatypes/SUN.info")
))
; Now exit, telling them what the situation is
(if (= choice 0)
(
; Installation was permanent
(exit
(cat "You will have to reboot the system before you can use the "
"Sun datatype."
))
)
(
; Installation was manual
(exit
(cat "You must double-click on the Sun Raster icon in the Storage->Datatypes "
"drawer on your Workbench disk in order to use the Sun datatype. "
"The datatype will then be available for use until you reboot."
))
))